home *** CD-ROM | disk | FTP | other *** search
- DOS & DON'TS -- PART 13
- =======================
-
-
-
- To OPEN a sequential file, you use
-
- the BASIC OPEN statement. The Logical
-
- File number can be anything from 1 to
-
- 127, the Device Number (or First Ad-
-
- dress) must be the unit number of the
-
- disk drive you are using (ranges from
-
- 8 to 11, usually 8). The Channel #,
-
- or Secondary Address can be anything
-
- from 2 to 14. (Remember, 15 is the
-
- CEC, and 0 and 1 are set up for LOADs
-
- and SAVEs, respectively.) The file
-
- name can be a string of up to 16 of
-
- almost any characters, except for
-
- Return, comma, colon, asterisk or the
-
- question mark. The file name also
-
- cannot begin with a number sign or a
-
- dollar sign, although these characters
-
- can be used within the file name.
-
-
- If you are OPENing an existing file
-
- to be read from, that is all you need.
-
- If you are creating a new file and you
-
- want to write to it, first be sure to
-
- SCRATCH it, then OPEN it with a ',S,W'
-
- attached to the name. This signifies
-
- a SEQuential file OPENed for WRITE. If
-
- you are OPENing an existing file to
-
- add data to the end of it, use the un-
-
- documented (at least in the current
-
- 1541 manual) ',A' option. This signi-
-
- fies an OPEN for APPEND. You need to
-
- specify the file type only when creat-
-
- ing the file. The mode must be speci-
-
- fied if it is not READ (',R').
-
-
- In an actual program, you should
-
- OPEN the CEC before OPENing any seq-
-
- uential files, and keep it OPEN until
-
- the last file has been CLOSED. This
-
- enables the program to detect and act
-
- upon the nature of various disk errors
-
- that may occur, and to send mainten-
-
- ance commands (such as the SCRATCH be-
-
- fore creating a file) to the drive.
-
-
- ======= Continued in Part 14 =========
-